#ifndef CGAMEPLAYSTATE_H_
#define CGAMEPLAYSTATE_H_
#include "CBaseGameState.h"
//#include "Camera.h"
#include "CObjectManager.h"
#include "CShape.h"
#include "CTextureManager.h"

class CSGD_FModManager;
class TextureManager;
class DXDeviceControl;
class CSGD_DirectInput;

class CGamePlayState : public CBaseGameState
{
private:
	CSGD_FModManager* m_pFMOD;
	CSGD_DirectInput* m_pDI;

	// all our objects
	CObjectManager m_Objects;

	CShape			 m_GlobeQuad;
	Texture			*m_pGlobeTexture;

	CShape			 m_CrustQuad1;
	CShape			 m_CrustQuad2;
	Texture			*m_pCrustTexture;

	//////////////////////////
	//// Texture stuff
	//enum { TEX_PLAYER, TEX_CLOUD, NUM_TEXTURES };
	//TextureManager* m_pTM;
	//int m_nTextureIDs[NUM_TEXTURES];
	//////////////////////////
	//// Camera stuff
	//CCamera m_Camera;
	//float m_fFarPlane;
	//float m_fNearPlane;
	//float m_fFieldOfView;

	//DXDeviceControl* m_devControl;

	// shader file
	//LPD3DXEFFECT m_effect;

	static CGamePlayState Instance;

	CGamePlayState(void) {}
	~CGamePlayState(void) {}
	CGamePlayState& operator=(const CGamePlayState& rhs) {}	

	bool LoadSFX(const char* filename );
	bool LoadPicturesFromFile(const char* filename);
	void LoadLevel(void);
public:
	/////////////////////////
	// AUDIO, gamestates will use this
	float m_fVolume;
	float m_fJumpVolume;
	float m_fRainVolume;
	
	enum { BG1_SFX, RAIN_SFX, ITEM_SFX, JUMP_SFX, JUMPLAND_SFX, THUNDER_SFX, NUM_SFX };
	int m_nSFX[NUM_SFX];

	/////////////////////////
	//	Textures
	enum { ARCH, CASTLE, GOTH_PILLAR, MIDEVIL_PLAT, GOTH_WINDOW1, GOTH_WINDOW2, GOTH_WINDOW3, GREEKARCH, GREEK_COL, EGYPT_PLAT, EGYPT_PILLAR, EGYPT_GATE, NUM_TEX, };
	Texture* m_pTextures[NUM_TEX];
	//CCamera* GetCamera(void) { return &m_Camera; }

	static CGamePlayState* GetInstance(void) { return &Instance; }

	void Enter();

	void Input();
	void Update(float dt);
	void Render();

	//void OnLostDevice(void);

	void Exit();
};

#endif CGAMEPLAYSTATE_H_